//
//  DengLuViewController.m
//  KCFurProject
//
//  Created by ios程序员 on 15/11/17.
//  Copyright © 2015年 ios程序员. All rights reserved.
//

#import "DengLuViewController.h"
#import "ZhuCeViewController.h"
#import "What.h"

@interface DengLuViewController ()

@property (nonatomic ,strong) UILabel *dengLuLabel;
@property (nonatomic ,strong) UITextField *zhTextField;
@property (nonatomic ,strong) UITextField *mmTextField;
@property (nonatomic ,strong) UIButton *dengLuButton;
@property (nonatomic ,strong) UIButton *zhuCeButton;
@property (nonatomic ,strong) UILabel *otherLabel;
@property (nonatomic ,strong) UIView *xianView;
@property (nonatomic ,strong) UIButton *wbButton;
@property (nonatomic ,strong) UIButton *wxButton;
@property (nonatomic ,strong) UIButton *qqButton;

@end

@implementation DengLuViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.dengLuLabel = [[UILabel alloc] initWithFrame:CGRectMake(50*WIDTH, 80*HEIGH, 50, 50)];
    self.dengLuLabel.text = @"登陆";
    self.dengLuLabel.font = [UIFont systemFontOfSize:24];
    [self.view addSubview:self.dengLuLabel];
    
    self.zhTextField = [[UITextField alloc] initWithFrame:CGRectMake(40*WIDTH, 150*HEIGH, 295*WIDTH, 30*HEIGH)];
    self.zhTextField.placeholder = @"用户名/弟子邮箱地址/手机号";
//    self.zhTextField.layer.
    self.zhTextField.borderStyle = UITextBorderStyleRoundedRect;
    [self.view addSubview:self.zhTextField];
    
    self.mmTextField = [[UITextField alloc] initWithFrame:CGRectMake(40*WIDTH, 195*HEIGH, 295*WIDTH, 30*HEIGH)];
    self.mmTextField.placeholder = @"密码";
    self.mmTextField.borderStyle = UITextBorderStyleRoundedRect;
    [self.view addSubview:self.mmTextField];

    self.dengLuButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.dengLuButton.frame = CGRectMake(40*WIDTH, 280*HEIGH, 295*WIDTH, 30*HEIGH);
    [self.dengLuButton setTitle:@"登陆" forState:UIControlStateNormal];
    self.dengLuButton.backgroundColor = [UIColor blackColor];
    self.dengLuButton.layer.borderWidth = 1;
    [self.dengLuButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self.dengLuButton setTitleColor:[UIColor redColor] forState:UIControlStateHighlighted];
    [self.view addSubview:self.dengLuButton];
    
    self.zhuCeButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.zhuCeButton.frame = CGRectMake(80*WIDTH, 350*HEIGH, 200*WIDTH, 30*HEIGH);
    [self.zhuCeButton setTitle:@"还不是会员? 获取 ppfur ID" forState:UIControlStateNormal];
    [self.zhuCeButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    self.zhuCeButton.titleLabel.font = [UIFont systemFontOfSize:13];
    [self.zhuCeButton addTarget:self action:@selector(zhuCeButtonClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.zhuCeButton];
    
    self.xianView = [[UIView alloc] initWithFrame:CGRectMake(70*WIDTH, 450*HEIGH,230*WIDTH , 2*HEIGH)];
    self.xianView.backgroundColor = [UIColor grayColor];
    [self.view addSubview:self.xianView];
    
    self.otherLabel = [[UILabel alloc] initWithFrame:CGRectMake(130*WIDTH, 470*HEIGH, 275*WIDTH, 20*HEIGH)];
    self.otherLabel.text = @"其他登录方式";
    self.otherLabel.font = [UIFont systemFontOfSize:15];
    [self.view addSubview:self.otherLabel];
    
    self.wbButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.wbButton.frame = CGRectMake(125*WIDTH, 500*HEIGH, 30*WIDTH, 30*HEIGH);
    [self.wbButton setImage:[UIImage imageNamed:@"wb.jpg"] forState:UIControlStateNormal];
    [self.view addSubview:self.wbButton];
    
    self.wxButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.wxButton.frame = CGRectMake(165*WIDTH, 500*HEIGH, 30*WIDTH, 30*HEIGH);
    [self.wxButton setImage:[UIImage imageNamed:@"wx.jpg"] forState:UIControlStateNormal];
    [self.wxButton addTarget:self action:@selector(wxButtonClicl:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.wxButton];

    self.qqButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.qqButton.frame = CGRectMake(205*WIDTH, 500*HEIGH, 30*WIDTH, 30*HEIGH);
    [self.qqButton setImage:[UIImage imageNamed:@"qq.jpg"] forState:UIControlStateNormal];
    [self.view addSubview:self.qqButton];

    
}
//注册
- (void)zhuCeButtonClick:(UIButton *)button
{
    ZhuCeViewController *zhuce = [[ZhuCeViewController alloc] init];
    [self.navigationController pushViewController:zhuce animated:NO];
}

//微信登陆
- (void)wxButtonClicl:(UIButton *)button
{
    [What sendAuthRequestScope:kAuthScope  State:kAuthState OpenID: kAuthOpenID InViewController:self];
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
